# -*- coding: utf-8 -*-
# too much data //

import sys

sys.path.append('../')
from common.config import *
from db.mysql import MysqlClient
from itertools import product
import requests, json
from common.helper import Helper

class Spider(object):
    def __init__(self):
        self.mysql = MysqlClient()
        self.name = "平安职场综合医疗保险"\
    # 生成产品数据
    def genProductInfo(self):

        plan = {
            # 年龄段
            "year":[str(i) for i in range(18,55)],
            # 性别
            "gender":["M","F"],
            # 有无社保
            "socialSec":["Y","N"],
            #意外身故伤亡
            "accidentDeath":["50000","200000","500000"],
            #意外医疗
            "accidentMedical":["0","50000","100000"],
            #猝死医疗
            "suddenDeath":["0","100000","200000","500000"],
            #疾病住院医疗
            "hospitalMedical":["0","10000","30000","40000"],
            #误工津贴
            "delayWorkAllowance":["0","20/天","50/天"],
            #飞机意外伤残/死亡
            "accidentPlane":["0","1000000","5000000","8000000"],
            #火车意外伤残/死亡
            "accidentTrain":["0","200000","500000","1000000"],
            #火车意外伤残/死亡
            "accidentShip":["0","200000","500000","1000000"],
            #汽车意外伤残/死亡
            "accidentPassenger":["0","200000","300000"]

        }
        num = 0
        for v in product(plan["year"],plan["gender"],plan["socialSec"],plan["accidentDeath"],plan["accidentMedical"],plan["suddenDeath"],plan["hospitalMedical"],plan["delayWorkAllowance"],plan["accidentPlane"],plan["accidentTrain"],plan["accidentShip"],plan["accidentPassenger"]):
            num += 1
        print( num )
if __name__ == '__main__':
    s = Spider()
    s.genProductInfo()